package com.example.aihub.service;

import com.example.aihub.entity.User;
import java.util.List;
import java.util.Optional;

public interface UserService {
    User registerUser(String username, String email, String password);
    Optional<User> findByUsername(String username);
    Optional<User> findByEmail(String email);
    boolean existsByUsername(String username);
    boolean existsByEmail(String email);
    User updateUserProfile(Long userId, String bio, String avatar);
    User findById(Long userId);
    List<User> getAllUsers();
    
    // 添加获取用户统计信息的方法
    int getPostCountByUser(User user);
    int getFollowerCountByUser(User user);
    int getFollowingCountByUser(User user);
    
    User updateUser(User user);
    
    // 添加关注相关方法
    void followUser(User follower, User followed);
    void unfollowUser(User follower, User followed);
    boolean isFollowing(User follower, User followed);
}